package com.binance.gateway.app.constant;

public class CacheKey {

    private static final String SECOND_VERIFY = "authcenter:secondverify:%s";
    private static final String TOKEN = "authcenter:token:%s";
    private static final String TOKEN_SET = "authcenter:tokenset:%s";

    public static String getSecondVerify(String value) {
        return String.format(SECOND_VERIFY, value);
    }

    public static String getToken(String token) {
        return String.format(TOKEN, token);
    }

    // public static String getToken(boolean isTerminal, String value) {
    // if (isTerminal) {
    // value = "app:" + value;
    // } else {
    // value = "web:" + value;
    // }
    // return String.format(TOKEN, value);
    // }

    public static String getTokenSetKey(String userId) {
        return String.format(TOKEN_SET, userId);
    }
}
